import { createApp } from 'vue';
import Loading from '@/components/common/Loading.vue'
let loading=null,isLoading=false
const showLoading=() =>{
  if(isLoading) return
  loading=createApp(Loading)
  const fragment:any=document.createDocumentFragment()
  loading.mount(fragment)
  document.body.appendChild(fragment)
  isLoading=true
}
const hideLoading=() =>{
  loading.unmount()
  isLoading=false
}
export {
  showLoading,hideLoading
}